
import axios from 'axios'
import to from '../utils/awaitTo'
const axios2 = axios.create({
  baseURL: 'http://toutiao-app.itheima.net'
})
export default ({ url, method = 'GET', params = {}, data = {}, header = {} }) =>
  to(axios2({
    url: url,
    method: method,
    params: params,
    data: data,
    header: header
  }))
